class System implements systemConfigs, systemMethods {

    public designWidthPx = 2400
    public designHeighthPx = 1080

    public baseUrl = "http://localhost:3000/"

    public setStart(obj) {
        for (const key in obj) {
            const element = obj[key];
            this[key] = element
        }
    }
}


interface systemConfigs {

    /** 设计稿的宽度  单位px*/
    designWidthPx: number
    /** 设计稿的宽度  单位px*/
    designHeighthPx: number
    /** 请求域名 */
    baseUrl: string

}

interface systemMethods {
    /** 修改全局配置 */
    setStart(obj: Partial<systemConfigs>): void
}


export default <systemConfigs & systemMethods>new System()
